<!-- BEGIN .main-navigation -->
<section class="main-navigation clearfix">
    <nav>
        <?php $this->widget('BreadcrumbsWidget',array('data' => $this->breadcrumbs))?>
        <div class="title">
            <?php echo $product->name; ?>
        </div>
    </nav>
    <!-- END .main-navigation -->
</section>
<section class="main-content-wrapper main-item-wrapper clearfix detail_product">

    <!-- BEGIN .main-item -->
    <section class="main-item clearfix">

        <div class="item-block-1">
            <div class="image-wrapper" id="_single-product-slider">

                <div class="image">
                    <a href="<?php echo urlImageFolder('product') . $product->getImage() ?>" class="lightbox-launcher"><img src="<?php echo urlImageFolder('product') . $product->getImage() ?>" alt="" /></a>
                </div>
                <?php foreach ($product->images as $image): ?>
                    <div class="image">
                        <a href="<?php echo urlImageFolder('product') . $image->getImage() ?>" class="lightbox-launcher"><img src="<?php echo urlImageFolder('product') . $image->getImage() ?>" alt="" /></a>
                    </div>
                <?php endforeach; ?>

            </div>
            <div class="thumbnails clearfix">
                <a href="#" class="next"></a>
                <div>
                    <a href="#" class="active"><img src="<?php echo urlImageFolder('product') . $product->getImage() ?>" alt="" /></a>
                    <?php foreach ($product->images as $image): ?>
                        <a href="#"><img src="<?php echo urlImageFolder('product') . $image->getImage() ?>" alt="" /></a>
                    <?php endforeach; ?>
                </div>
                <a href="#" class="previous"></a>
            </div>
        </div>

        <div class="item-info">
            <h2 style="font-size: 26px"><a href="#"><?php echo $product->name; ?></a></h2>
            <div class="item-text">
                <?php echo $product->description; ?>
            </div>
            <div class="details clearfix">
                <form action="<?php echo Yii::app()->createUrl('cart/edit')?>" method="post" id="form_add_cart">
                    <input type="hidden" name="action" value="add" />
                    <input type="hidden" name="product_id" value="<?php echo $product->product_id; ?>" />
                    <?php
                    $properties = $product->getProperties();
                    foreach ($properties as $property):
                        ?>
                        <p class="item">
                            <label><?php echo $property['property']['name'] ?></label>
                            <select name="property[<?php echo $property['property']['id'];?>]">
                                <?php foreach ($property['propertyValue'] as $key => $item): ?>
                                    <option value="<?php echo $item['id'] ?>"><?php echo $item['name'] ?></option>
                                <?php endforeach; ?>
                            </select>
                        </p>
                    <?php endforeach; ?>
                    <p class="item quantity">
                        <label>Quantity:</label>
                        <select name="quantity">
                            <?php for($i = 1;$i < 10;$i++):?>
                            <option value="<?php echo $i?>"><?php echo $i?></option>
                            <?php endfor;?>
                        </select>
                    </p>
                    <p class="item">
                        <label>Share this item:</label>
                        <span class="social-icons clearfix">
                            <span class='st_facebook_custom facebook'></span>
                            <span class='st_twitter_custom twitter'></span>
                            <span class='st_linkedin_custom linkedin'></span>
                            <span class='st_stumbleupon_custom stumbleupon'></span>
                            <span class='st_blogger_custom blogspot'></span>
                        </span>

                    </p>

                </form>
            </div>
            <div class="price">
                <?php echo number_format($product->getPrice(), 0) ?> VND
                <?php if ($product->getOldPrice() != 0): ?>
                    <s><?php echo number_format($product->getOldPrice(), 0) ?> VND</s>
                <?php endif; ?>
            </div>
            <div class="buy">
                <button type="submit" id="add_cart">Add to cart</button>
            </div>
            <br class="clearBoth"/>
        </div>
        <?php
        //$this->widget('FeatureWidget',array('template' => 'buy'));
        ?>

        <!-- END .main-item -->
    </section>

    <?php
        $this->widget('RelatedWidget',array('category' => $product->category));
    ?>

    <!-- BEGIN .special-offers -->


    <!-- END .main-content-wrapper -->
</section>